Skip to content

West Midlands | 26-ITP-May | Alina Sofragiu | Sprint 2 | Book-library - #508

Open
sofragiualina wants to merge 8 commits into
CodeYourFuture:mainfrom
sofragiualina:book-library
Open

West Midlands | 26-ITP-May | Alina Sofragiu | Sprint 2 | Book-library#508
sofragiualina wants to merge 8 commits into
CodeYourFuture:mainfrom
sofragiualina:book-library

Conversation

@sofragiualina

Copy link
Copy Markdown

… functionality

Learners, PR Template

Self checklist

  • [ x ] I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • [ x ] My changes meet the requirements of the task
  • [ x ] I have tested my changes
  • [ x ] My changes follow the style guide

Changelist

Fixed the Book Library bugs

@sofragiualina sofragiualina added 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Data-Flows The name of the module. labels Aug 3, 2026

@cjyuan cjyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check if any of this general feedback can help you further improve your code?
https://github.com/CodeYourFuture/Module-Data-Flows/blob/general-review-feedback/debugging/book-library/feedback.md

Doing so can help me speed up the review process. Thanks.

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 5, 2026
@sofragiualina

Copy link
Copy Markdown
Author

I've gone through the review and updated my project I fixed the HTML validation issues, improved the input validation, renamed variables to be more descriptive, used textContent instead of innerHTML where appropriate, stored the page count as a number and made other improvements

@sofragiualina sofragiualina added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Aug 5, 2026

@cjyuan cjyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look solid. I only have a few comments.

Comment thread debugging/book-library/index.html Outdated
Comment on lines +38 to +39
<label for="pages">Pages</label>
<input type="number" id="pages" class="form-control" min="1" required />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not make this input element to accept only positive whole number?

Comment thread debugging/book-library/script.js Outdated
Comment on lines +32 to +34
const pages = Number(pagesInput.value);

if (title === "" || author === "" || !pages) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if pagesInput.value is "1.234"?

Comment thread debugging/book-library/index.html Outdated
value="Submit"
class="btn btn-primary"
onclick="submit();"
onclick="submit()"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not attach submit() as the callback in the JavaScript code (instead of specifying it in HTML)?

Comment thread debugging/book-library/script.js Outdated

render();

alert(`You've deleted "${deletedTitle}".`);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alert() is a blocking function call. As a result, invoking it prevents the browser from updating the UI until the dialog is dismissed.

If time permits, research for approaches that allows the UI to update before displaying the alert dialog. (This is an optional change).

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 6, 2026
@sofragiualina

Copy link
Copy Markdown
Author

applied the suggested changes, thank you

@sofragiualina sofragiualina added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Data-Flows The name of the module. Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants